This tutorial shows how IntelliJ can automatically create Test Class by selecting Methods you want to test.
IntelliJ will create new Test Class under main\test\com.ivoronline.springboot_junit
● created Test Class will have the same name as the Class that contains selected Methods but with additional Test suffix
(if selected Methods were from the Class Person then IntelliJ will create Test Class named PersonTest)
● IntelliJ will also recreate the same Packages
(if Class Person was in the Package entities, then Class PersonTest will also be placed in the Package entities)
Content
Create Test Class
Result